$.amud.character={
	action:function(){
		var parent = $('.charId').parent('.amud_character_message').not('.process_done');
		$(parent).addClass('process_done');
				
		$(parent).children(	'.room, .statusCapabilities, .capabilities, '+
							'.baseStrength, .baseDexterity, .baseVitality, '+
							'.baseIntelligence, .roles, .statusCommands'
						
			).each(
				function(){
					$(this).remove();
		});
		$(parent).children('.XP, .MP, .HP').each(
				function(){
					var cl = this.className;
					$(this).html(cl+':'+$(this).text());
					$(this).removeClass(cl);
					$(this).addClass('char_'+cl);
		});
        $(parent).children('.status').each(
            function(){
                $(this).html('Status'+$(this).html());
            }
        );
        $(parent).children('.status').children().each(
				function(){
                    $(this).children('.id, .duration, .capabilities, .commands, .applied').each(
                        function(){
                            $(this).remove();
                        }
                    );
                    $(this).children('.description, .level').each(
                        function(){
                            var cl = this.className;
                            if($(this).text()=='null' || $(this).text()=='1'){
                                val='';
                            }else if($(this).text()>1){
                                val='x'+$(this).text();
                            }else{
                                val=$(this).text();
                            }
                            $(this).html(val);
                            $(this).removeClass(cl);
                            $(this).addClass('char_status_'+cl);
                        }
                    );
		});
		$(parent).children('.items').children().each(
			function(){
				if($(this).text()=='null')
					$(this).remove();
			}
		);
	}
}

$(document).bind('updated', $.amud.character.action);
